home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-01-31 | 1.5 KB | 52 lines | [TEXT/R*ch] |
- // ===========================================================================
- // File: UWindowStagger.h
- // Version: 1.0.1 - Jan 31, 1997
- // Author: Mike Shields (mshields@inconnect.com)
- //
- // Copyright ©1996 Mike Shields. All rights reserved.
- // ===========================================================================
- // UWindowStagger.cp <- double-click + Command-D to see class declaration
- //
- // Static class which allows you to stagger windows on the desktop in an intelligent
- // manner.
-
- #pragma once
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __QUICKDRAW__
- #include <Quickdraw.h>
- #endif
-
- class LWindow;
-
- const short kHorizWindowStaggerAmount = 8;
- const short kVertWindowStaggerAmount = 20;
-
-
- class UWindowStagger
- {
- public:
- static void StaggerFromPosition(LWindow* inWindow, Point inPosition,
- short inDeltaH = kHorizWindowStaggerAmount,
- short inDeltaV = kVertWindowStaggerAmount);
- static void Stagger(LWindow* inWindow,
- short inDeltaH = kHorizWindowStaggerAmount,
- short inDeltaV = kVertWindowStaggerAmount);
-
- static void ForceOnScreen(LWindow* inWindow);
-
- static void GetMonitorRect(WindowPtr inFrontWindow, Rect& outMonitorRect);
-
- static Boolean IsPositionUnique(Point inPosition);
-
- static void MakePositionUnique(LWindow* inWindow, Point &inNewPosition,
- Point inTopLeft, Point inDelta,
- const Rect& inMonitorRect);
-
- static Boolean WillWindowFit(LWindow* inWindow, Point inCurrentPosition,
- const Rect& inMonitorRect);
- };
-